Skip to content

[codex] add C parser skeleton CLI - #13

Merged
saidctb merged 1 commit into
c-parser/mainfrom
codex/c-parser-skeleton-cli
May 21, 2026
Merged

[codex] add C parser skeleton CLI#13
saidctb merged 1 commit into
c-parser/mainfrom
codex/c-parser-skeleton-cli

Conversation

@saidctb

@saidctb saidctb commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the initial C parser skeleton behind explicit C-mode entrypoints and CLI flags.

Changes

  • Add the c_parser package with typed skeleton models, CParseError, CParser, parse_c_file, and parse_c_project.
  • Wire x2py --language c --parse to stable skeleton human and JSON output while keeping Fortran as the default.
  • Reject unsupported C semantic, .pyi, and wrap-readiness stages until later phases.
  • Add focused C skeleton CLI/API tests while leaving broader C roadmap tests skipped.
  • Update docs/c_parser/ to reflect skeleton status and require future C parser work to update all affected docs in the same change.

Impact

Users can now discover and run explicit C parse skeleton commands without changing existing Fortran behavior. The skeleton does not claim real C declaration parsing yet; all parser sections remain empty with parser_status: skeleton.

Validation

  • python3 -m pytest -q tests/parser/c/test_c_cli_skeleton.py tests/parser/c/test_c_public_api_skeleton.py tests/parser/test_cli.py
  • python3 -m pytest -q

Full-suite result from the final code: 2985 passed, 84 skipped.

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.63415% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
x2py/cli.py 75.00% 5 Missing and 1 partial ⚠️
c_parser/models.py 98.56% 1 Missing and 1 partial ⚠️
c_parser/project.py 0.00% 2 Missing ⚠️
c_parser/preprocessor.py 0.00% 1 Missing ⚠️
Flag Coverage Δ
py312 92.55% <94.63%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
c_parser/lexer.py 100.00% <100.00%> (ø)
c_parser/parser.py 90.83% <100.00%> (ø)
c_parser/type_resolver.py 80.95% <100.00%> (ø)
c_parser/utils.py 93.75% <100.00%> (ø)
c_parser/preprocessor.py 0.00% <0.00%> (ø)
c_parser/models.py 98.75% <98.56%> (ø)
c_parser/project.py 0.00% <0.00%> (ø)
x2py/cli.py 93.41% <75.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saidctb
saidctb marked this pull request as ready for review May 21, 2026 22:23
@saidctb
saidctb merged commit d314b80 into c-parser/main May 21, 2026
5 of 6 checks passed
@saidctb
saidctb deleted the codex/c-parser-skeleton-cli branch May 21, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant